import socket
import time
import queue

class Pxy:

    def __init__(self):
        self.CLIENT = None
        self.q = None
    
    def send(self,frame):
        print("send")
        if self.CLIENT:
            print("send frame")
            self.CLIENT.sendall(frame)
        time.sleep(5)
        while self.q.empty():
            item = self.q.get()
            return item
        return None
    def setClient(self,c):
        self.CLIENT = c
    def setQueue(self, que):
        self.q = que

proxy = Pxy()